| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]
STR #1130
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Unassigned |
Summary: | A global file for setting FLTK defaults like the default font (think .gtkrc) |
Version: | 2.0-feature |
Created By: | rubin |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
#1 | rubin 06:56 Dec 18, 2005 |
| Apparently there is no way to set a default font for fltk applications. This poses a problem when certain fonts are not available and looks ugly when for example the entire system uses Tahoma or Times, while the odd fltk app uses something else. It would be great if there was a file like ~/.fltk/defaults or a variable that would allow you to specify the default font.
If this functionality is already available, it is not obvious; an example or FAQ entry should detail how to go about it. | |
|
#2 | greg.ercolano 11:37 Aug 28, 2009 |
| I'd opened STR#1029 a few months before recommending functions be added to make this clearer, so these two STRs are related.
There is a way to set the default font, it's just non-intuitive: http://fltk.org/newsgroups.php?s6582+gfltk.general+v6588+T
You're right it should be more boldly advertised, which is why I'm leaving this open. At very least, the functions that get the font face/size should reference the way to change defaults with a "See Also". Possibly a FAQ should be added as well.
Regarding a file like ~/.fltk/defaults: This is a direction I personally know Bill (Spitzak) did NOT want to go. IIRC, Bill did not like the problems that files like ~/.Xdefaults (the X windows equiv) caused, citing among other things how such a file can affect ALL fltk apps, and can cause app-specific problems that are very hard to debug, as users often won't report such customizations, having long forgot they were there when reporting bugs. I agree with this, and would strongly lobby against it.
Design-wise, FLTK likes to handle changing such things via the command line (eg. Fl_Window::show(argc,argv)), so that might be a way to supply this. However, changing the default font size via the command line would surely break most apps, since FLTK doesn't reoriented widget layouts when font sizes are changed. | |
|
#3 | isaque 16:14 Aug 28, 2009 |
| In fltk 2.0 we have the Style class.
Although I don't know how to use it yet, but I believe this kind of setup should be performed by that class didn't it? | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |